FROM nginx:latest  AS build

MAINTAINER alitan <qingcloudtech.com>
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY qingcloud-ec.template /etc/nginx/conf.d/qingcloud-ec.template
COPY nginx.conf /etc/nginx/nginx.conf
#COPY html/  /var/lib/html/

WORKDIR /etc/nginx/conf.d
ENTRYPOINT envsubst '${EC_GATEWAY_HOST} ${EC_GATEWAY_PORT}'  < qingcloud-ec.template > qingcloud-ec.conf && cat qingcloud-ec.conf && nginx -g 'daemon off;'
EXPOSE 9000